// utils/auth.js


export const checkAuth = async (urlData) => {
	await startWxWorkAuth()
}

const startWxWorkAuth = () => {
	return new Promise((resolve) => {
		const encodedTarget = encodeURIComponent('/pages/index/callBack');
		
		const authUrl =
		`https://puhuicaizhi.com/wx/yingyong/login?wantUrl=${encodedTarget}`; //跳转到 授权页面，（携带当前路径）
		console.log("authUrl",authUrl)
		window.location.href = authUrl
	
	})
}

const isTokenExpired = (token) => {
	// 检查token是否过期（根据实际业务实现）
	return false
}